latexwikiaorg-20200214-history
List of LaTeX environments
A LaTeX environment is one of the following: __TOC__ Primitive environments A primitive environment is an outer environment in which other environments can be nested. Float Environments Text inside a float environment is "floated" according to its placement, an optional parameter. The standard and classes use the default placement tbp. The float environments are and . Figure environment \begin{figure}placement ...body of the figure... \caption{figure title} \end{figure} Placement is one of the following :h (Here) - at the position in the text where the table environment appears. :t (Top) - at the top of a text page. :b (Bottom) - at the bottom of a text page. :p (Page) of floats - on a separate float page, which is a page containing no text, only floats. Table environment The table environment has the same characteristics as the figure environment. List Environments The list environments are , , , and the generic , which is seldom used in text, but often in macros. Within a list environment commands are used to identify the items in the list. description Environment The description environment produces a labeled list. \begin{description} \item label First item \item label Second item :... \end{description} enumerate Environment The enumerate environment produces a numbered list. At least one item is needed. Enumerate lists can be nested inside other enumerate lists, up to four levels deep. \begin{enumerate} \item First item \item Second item :... \end{enumerate} itemize Environment The itemize environment creates an unnumbered, or "bulleted" list. \begin{itemize} \item First item \item Second item :... \end{itemize} list Environment \begin{list}{label}{fmt-params} \item First item \item Second item :... \end{list} ;label :specifies how items should be labeled. This argument is a piece of text that is inserted in a box to form the label. This argument can and usually does contain other LaTeX commands. ;fmt-params :contains commands to change the spacing parameters for the list. An empty argument will select all default spacing which should suffice for most cases. :The format parameters are: (See external reference for a diagram of these) ::\itemsep ::\labelsep ::\labelwidth ::\leftmargin ::\listparindent ::\parsep ::\parskip ::\partopsep ::\rightmargin ::\topsep Math environments The math environments are , , , and array environment \begin{array}{col1col2…coln} item11 & item12 … & item1n\\ item21 & item22 … & item2n\\ :... itemn1 & itemn2 … & itemnn\\ \end{array} Each of col1, col2, etc. is a single letter, :c - for centred :l - for flush left :r - for flush right Columns are separated by an &, and each row ends with a double backslash, \\. eqnarray environment \begin{eqnarray} math formula 1 math formula 2 :... \end{eqnarray} The eqnarray environment is An equation number is placed on every line unless that line has a \ command. The command \ is used for splitting long formulas across lines. It typesets its argument in display style flush left in a box of zero width. equation environment The equation environment centers the equation, and places an equation number in the right margin. \begin{equation} ... math formula \end{equation} theorem environment The theorem environment produces "Therem x" in bold face, followed by your theorem text. \begin{theorem} ... theorem text \end{theorem} Paragraph environments The paragraph environments are , , , , , , , and . Within a paragraph environment, each line must be terminated with a double backslash, \\. Related commands are , , , , , , and center environment The center environment allows you to create a paragraph consisting of lines that are centered within the left and right margins on the current page. flushleft environment The flushleft environment allows you to create a paragraph consisting of lines that are flushed left, to the left-hand margin. flushright environment The flushright environment allows you to create a paragraph consisting of lines that are flushed right, to the right-hand margin. minipage environment The minipage environment is similar to the \ command. It is not advisable to nest minipage environments, because it messes up footnote positioning. \begin{minipage}position{width} ... text \end{minipage} quotation environment The margins of the quotation environment are indented on the left and the right. The text is justified at both margins and there is paragraph indentation. quote environment The margins of the quotation environment are indented on the left and the right. The text is justified at both margins without paragraph indentation verbatim environment Uses typewriter (\ ) style, similar to the \ command. verse environment The verse environment is designed for poetry. The margins are indented on the left and the right. End each lines with \\, and use a blank line to separate the stanzas. Picture environment \begin{picture}(width,height)(x offset,y offset) :... picture commands \end{picture} ;picture commands are :\ :\ :\ :\ :\ :\ :\ :\ :\ :\ :\ :\ Table environments tabbing environment In the environment, * Tab stops are set with \=. * \> advances to the next tab stop. * \+ ends a line, and begins the next line one tab stop to the right. * \- ends a line, and begins the next line one tab stop to the left. \begin{tabbing} function \= fact(n : integer) : integer; :\> begin \= \+ ::\> if \= n $>$ 1 then \+ :::fact := n * fact(n-1) \- ::else \+ :::fact := 1; \-\- :end; \end{tabbing} Related commands are :\= :\> :\ :\ :\ :\ :\ :\ :\ :\ :\ :\ :\ :\ tabular environment The environment uses ampersands (&) to separate columns. \begin{tabular}pos{cols} column 1 entry & column 2 entry … & column n entry :... \end{tabular} :::or \begin{tabular*}{width}pos{cols} column 1 entry & column 2 entry … & column n entry :... \end{tabular*} Other environments Thebibliography environment The environment is used to print a bibliography. Related commands are , , \begin{thebibliography}{widest-label} \bibitemlabel{cite_key} :... \end{thebibliography} Titlepage environment The environment is used to print a title page. It has no printed page number or page heading. The following page is numbered page 1. A related commands is . \begin{titlepage} :... title page text \end{titlepage} External references * [http://latex.computersci.org/Reference/ListEnvironments diagram showing how format parameters are used in list environments]